package com.wowo.aoon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Boy {
    private String name;
    @Autowired@Qualifier("kgirl")
    private Girl girl;

    public Boy(){}

    public Boy(@Value("W5") String name,@Qualifier("kgril") Girl girl) {
        this.name = name;
        this.girl = girl;
    }

    public String getName() {
        return name;
    }
    @Value("zz3")
    public void setName(String name) {
        this.name = name;
    }

    public Girl getGirl() {
        return girl;
    }
    @Autowired @Qualifier("jgirl")
    public void setGirl(Girl girl) {
        this.girl = girl;
    }
}
